package cn.kgc.springcloud.server.impl;

import cn.kgc.springcloud.dao.CityDao;
import cn.kgc.springcloud.entity.City;
import cn.kgc.springcloud.server.CityServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityServerImpl implements CityServer {
    @Autowired
    private CityDao cityDao;
    @Override
    public List<City> queryCities() {
        return cityDao.queryCities();
    }

    @Override
    public City addOne(City city) {
        int line=cityDao.addOne(city);
        return city;
    }

    @Override
    public City selectOne(Integer id) {
        return cityDao.selectOne(id);
    }
}
